<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>数据来源导航-个人心情日记</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        body {
            background-color: #2b2e3f;
        }

        .content-div {
            text-align: center;
            margin-top: 15vh;
        }

        .btn {
            display: inline-block;
            height: 36px;
            line-height: 36px;
            padding: 0 20px;
            background: #fff;
            border-radius: 4px;
            margin-right: 10px;
            cursor: pointer;
            user-select:none;
        }

        .btn.cof {
            background: #409eff;
            color: #fff;
        }
        .tishi{
            text-align: left;
            display: inline-block;
            color: #fff;
            line-height: 40px;
            margin-bottom: 20px;
            font-size: 30px;
        }
        .shifou {
            font-size: 30px;
            color: red;
            margin-bottom: 20px;
        }
    </style>
</head>

<body>
    <div class="content-div">
        <div class="tishi">
            声明：<br>
            学习库资源来源于网络，此导航将导航到数据来源。<br>
            数据来源信息与本站无任何关联。<br>
            数据来源只是让更多的人能学习到新的知识。<br>
            如果有侵权、违规联系删除。
        </div>
        <div>
            <div class="shifou">【防】是否确认导航到数据来源？</div>
            <span class="btn" onclick="quxiao()">取消</span>
            <span class="btn cof" onclick="tiaozhuan()">确认</span>
        </div>
    </div>
</body>
<script>

    function tiaozhuan() {
        let url = "http://xq.fk.bhbbk.net/product/" + getQueryString('uid') + ".html";
        console.log(url);
        if (getQueryString('uid')) {
            // PC端
            if (!_isMobile()) {
                window.open(url);
                window.close();
            } else {
                location.href = url;
            }
        }
    }

    function quxiao(){
        window.close();
    };
    // 获取地址参数
    function getQueryString(name) {
        const reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
        const r = window.location.search.substr(1).match(reg);
        if (r != null) return decodeURIComponent(r[2]);
        return null;
    };
    function _isMobile() {
        let flag = navigator.userAgent.match(
            /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i
        );
        return flag;
    };
</script>

</html>